package cn.sxt.common.util;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class BaseTest {
	/**
	 * 基本测试类
	 */
	protected ApplicationContext ac=null;
	@Before
	public void init(){
		ConstatUtil.LOGGER.info("---init初始化成功---");
		ac=new ClassPathXmlApplicationContext("classpath*:spring/applicationContext_*.xml");
	}
	
	@Test
	public void test1(){
		ConstatUtil.LOGGER.info("---test---");
	}
	
	@After
	public void destory(){
		ConstatUtil.LOGGER.info("---destory销毁---");
		ClassPathXmlApplicationContext cpac=(ClassPathXmlApplicationContext)this.ac;
		cpac.close();
	}
}
